The goal
I wanted to redo my site which was previously built with React for the frontend and Strapi as the CMS. But I thought it was a bit much to use React for such a simple site. So I decided to switch to using Astro JS which is known for being used as a frontend for blogs because of its SSR features and performance. Plus if I don't have to always fetch the data from Strapi when a user goes to my site it can save me some money.
Building the site
I have used Astro before so getting it all set up was pretty easy. I really like Astro as a framework and it's so nice being able to use a mix of other frameworks like React and Vue but I just used a bit of React. I am still learning about Astro so I'm not 100% sure I got it doing everything I wanted it to do like the SSR but I'm 90% sure I did. And this is being hosted on Vercel.
When it comes to the CMS I am also pretty familiar with Strapi and I like using Railway to quickly host a docker image of it. I will probably move it to my own server once I learn more about doing that sort of stuff but for now this will do.
What I learned
- Astro.js and its SSR features
- SEO optimization and performance
- Strapi: fetching and displaying data from it
Things to add or fix
- I would like to learn more about Astro's content collection feature to add to my site which would help me structure the data better.
- I couldn't get index.astro file to statically generate so I had to redirect / to /home and statically generate the home page instead. So I want to figure that out.
- Improve file structure and clean up the code.
- Make it more SEO friendly.
- At the moment I have to manually rebuild the site every time I edit a post and make a new one so I need to add some sort of thing that tells it to rebuild when I make a new post.
Conclusion
Its all not bad but when it comes to customization something like Notion is so much better so i will be looking for an open source solution where i can easily create beautiful blog posts.